/*************************************************************************
	> File Name: oj-523.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2021年01月27日 星期三 10时25分18秒
 ************************************************************************/
#include <cstdio>

using namespace std;

int main() {
    unsigned long n;
    scanf("%lu", &n);
    for (int i = 1; i <= n; ++i) {
        unsigned long l = 1, r = i, mid, temp;
        while (l <= r) {
            mid = (l + r) >> 1;
            temp = (mid + i) * (i - mid + 1) / 2;
            if (temp == n) {
                for (int j = mid; j <= i; ++j) {
                    (j - mid) && printf(" ");
                    printf("%d", j);
                }
                printf("\n");
                return 0;
            }
            if (temp > n) l = mid + 1;
            else r = mid - 1;
        }
    }
    
    return 0;
}
